Analysis on Reinfection of Sexually Transmitted Diseases

Yichu Chen, Gu Gong, Kate Jones, Gianni Spiga

2022-11-29

Libraries Used

library(survival)
library(KMsurv)
library(ggplot2)
library(ggpubr)
library(survminer)
library(plotly)
library(muhaz)
library(ggthemes)
library(plyr)

Loading in Data

data(std)
std
## [1] FALSE

Exploratory Data Analysis

Take a look at correlation between symptoms and different infection types.

Is it more common for one type of infection based on type of sex (oral/anal).

Kaplan-Meier Curves

## Call:
## survdiff(formula = surv_object ~ iinfct, data = std)
## 
##                    N Observed Expected (O-E)^2/E (O-E)^2/V
## iinfct=gonorrhea 140       73     54.5   6.28042   7.50617
## iinfct=chlamydia 396      135    153.0   2.12201   3.81136
## iinfct=both      341      139    139.5   0.00166   0.00278
## 
##  Chisq= 8.5  on 2 degrees of freedom, p= 0.01

Cumulative Hazards and CLogLog